<template>
  <view class="container">
    <view class="page-title">家属登陆</view>
    <form class="page-form" @submit="formSubmit" @reset="formReset">
      <view class="page-form-input">
        <l-icon l-class="input-icon" name="user" color="#dddddd" />
        <input type="text" placeholder="请输入老人家属手机号" placeholder-class="input-placeholder" />
      </view>
      <view class="page-form-input">
        <l-icon l-class="input-icon" name="password" color="#dddddd" />
        <input type="password" password placeholder="请输入密码" placeholder-class="input-placeholder" />
      </view>
      <view class="page-submit">
        <button form-type="submit" class="submit-btn">登陆</button>
      </view>
      <view class="page-tip">
        <text class="page-tip-text" bindtap="handleFirst">首次登陆请点击这里</text>
        <text class="page-tip-text" bindtap="handleForget">忘记密码？</text>
      </view>
    </form>
  </view>
</template>

<script>
import Vue from "vue";
import Taro from "@tarojs/taro";
export default {
  name: "Login",
  components: {},
  data() {
    return {};
  },
  methods: {
    formSubmit(e) {
      console.log(e);
      Taro.redirectTo({ url: "/pages/index/index" });
    },

    formReset(e) {
      console.log(e);
    },
    handleFirst() {
      console.log("haskjfgksjafgkfgksjagf");
      Taro.navigateTo({ url: "/pages/login/create" });
    },
    handleForget() {
      Taro.navigateTo({ url: "/pages/login/forget" });
    },
  },
};
</script>

<style lang="scss">
@import "./index.scss";
</style>
